<h1>Listing photos</h1>

<table>
  <tr>
    <td>posted by</td>
    <td>added on</td>
    <td>last update</td>
    <td>mapped</td>
    <td>game status</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>  
<% for photo in @photos %>
  <tr>
    <td><%=h Person.find(photo[:person_id])[:username] %></td>
    <td><%= photo[:dateadded].strftime  '%Y/%m/%d' %></td>
    <td><%= photo[:lastupdate].strftime  '%Y/%m/%d' %></td>
    <td><%= photo[:mapped] %></td>
    <td><b><%= photo[:game_status] %></b></td>
    <td><%= link_to 'Show', :action => 'show', :id => photo %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => photo }, :confirm => 'Are you sure?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @photo_pages.current.previous } if @photo_pages.current.previous %>
<%= link_to 'Next page', { :page => @photo_pages.current.next } if @photo_pages.current.next %> 
